home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Aventura / Squeaky.swf / scripts / frame_150 / PlaceObject2_459_90 / CLIPACTIONRECORD onClipEvent(enterFrame).as < prev    next >
Encoding:
Text File  |  2005-08-04  |  452 b   |  22 lines

  1. onClipEvent(enterFrame){
  2.    if(_root.hero._y > 345 && _root.alive == "yes")
  3.    {
  4.       if(this._x < _root.hero._x)
  5.       {
  6.          this._x += 5;
  7.          this.gotoAndStop("right");
  8.       }
  9.       else
  10.       {
  11.          this._x -= 5;
  12.          this.gotoAndStop("left");
  13.       }
  14.       if(_root.hero.shape.hitTest(this.heart))
  15.       {
  16.          _root.health.nextFrame();
  17.          xmoving = 0;
  18.          _root.kill.start();
  19.       }
  20.    }
  21. }
  22.